package hw;

// 将下面字符串?后面的键值对保存到proerties文件中    String url = "http://www.lovo.com/index?name=aaaaaa&age=20&gender=男";


import Util.FIleUtil;

import java.util.Properties;

public class Test {
    public Properties properties =new Properties();

    public void getString (){
        String url = "http://www.lovo.com/index?name=aaaaaa&age=20&gender=男";
        int bgindex= url.indexOf('?');

        String str1= url.substring(bgindex+1);

        String[] strs = str1.split("&");
        for (int i =0;i<strs.length;i++){
            String[] stroeStrs = strs[i].split("=");
            properties.setProperty(stroeStrs[0],stroeStrs[1]);
            FIleUtil.properStore("1.properties",properties);
        }
    }
    public static void main(String[] args) {
        Test test = new Test();
        test.getString();
    }



}
